{{include template('public/header','admin')}}
<body>
    <div id="page-wrapper">
        <div class="row">
            <div class="col-lg-12">
                <div class="alert alert-warning">
                    <ul id="tipslis">
                        <li>1.统计的用户资料与用户栏目设置有关：只有表单元素为下拉框或单选框的会做统计。</li>
                        <li>2.如果统计项可能有改变，请先更新统计项，再更新数据</li>
                    </ul>
                </div>
                <form name="cpform" method="post" autocomplete="off" action="/member/stat/index/?fieldid={{$smarty.get.fieldid}}" id="cpform" >
                    <input type="hidden" name="formhash" value="{{formhash()}}" />
                    <input type="hidden" id="formscrolltop" name="scrolltop" value="" />
                    <input type="hidden" name="anchor" value="" />
                    <table class="table ">
                        <tr><th colspan="15" class="partition">资料统计项</th></tr>
                        <tr><td colspan="5">
                                <ul>
                                    <li style="float: left; width: 160px;{{if $smarty.get.fieldid eq 'groupid' }}  font-weight: 900;{{/if}} "><a href="/member/stat/index/?fieldid=groupid">用户组</a></li>
                                    <li style="float: left; width: 160px;{{if $smarty.get.fieldid eq 'gender' }}  font-weight: 900;{{/if}} "><a href="/member/stat/index/?fieldid=gender">性别</a></li>
                                    <li style="float: left; width: 160px;{{if $smarty.get.fieldid eq 'birthyear' }}  font-weight: 900;{{/if}} "><a href="/member/stat/index/?fieldid=birthyear">出生年份</a></li>
                                    <li style="float: left; width: 160px;{{if $smarty.get.fieldid eq 'birthmonth' }}  font-weight: 900;{{/if}} "><a href="/member/stat/index/?fieldid=birthmonth">出生月份</a></li>
                                    <li style="float: left; width: 160px;{{if $smarty.get.fieldid eq 'birthday' }}  font-weight: 900;{{/if}} "><a href="/member/stat/index/?fieldid=birthday">生日</a></li>
                                    <li style="float: left; width: 160px;{{if $smarty.get.fieldid eq 'constellation' }}  font-weight: 900;{{/if}} "><a href="/member/stat/index/?fieldid=constellation">星座</a></li>
                                    <li style="float: left; width: 160px;{{if $smarty.get.fieldid eq 'zodiac' }}  font-weight: 900;{{/if}} "><a href="/member/stat/index/?fieldid=zodiac">生肖</a></li>
                                    <li style="float: left; width: 160px;{{if $smarty.get.fieldid eq 'bloodtype' }}  font-weight: 900;{{/if}}"><a href="/member/stat/index/?fieldid=bloodtype">血型</a></li>
                                    <li style="float: left; width: 160px;{{if $smarty.get.fieldid eq 'idcardtype' }}  font-weight: 900;{{/if}} "><a href="/member/stat/index/?fieldid=idcardtype">证件类型</a></li>
                                    <li style="float: left; width: 160px;{{if $smarty.get.fieldid eq 'birthprovince' }}  font-weight: 900;{{/if}} "><a href="/member/stat/index/?fieldid=birthprovince">出生省份</a></li>
                                    <li style="float: left; width: 160px;{{if $smarty.get.fieldid eq 'birthcity' }}  font-weight: 900;{{/if}} "><a href="/member/stat/index/?fieldid=birthcity">出生地</a></li>
                                    <li style="float: left; width: 160px;{{if $smarty.get.fieldid eq 'birthdist' }}  font-weight: 900;{{/if}} "><a href="/member/stat/index/?fieldid=birthdist">出生县</a></li>
                                    <li style="float: left; width: 160px;{{if $smarty.get.fieldid eq 'birthcommunity' }}  font-weight: 900;{{/if}} "><a href="/member/stat/index/?fieldid=birthcommunity">出生小区</a></li>
                                    <li style="float: left; width: 160px;{{if $smarty.get.fieldid eq 'resideprovince' }}  font-weight: 900;{{/if}} "><a href="/member/stat/index/?fieldid=resideprovince">居住省份</a></li>
                                    <li style="float: left; width: 160px;{{if $smarty.get.fieldid eq 'residecity' }}  font-weight: 900;{{/if}} "><a href="/member/stat/index/?fieldid=residecity">居住地</a></li>
                                    <li style="float: left; width: 160px;{{if $smarty.get.fieldid eq 'residedist' }}  font-weight: 900;{{/if}} "><a href="/member/stat/index/?fieldid=residedist">居住县</a></li>
                                    <li style="float: left; width: 160px;{{if $smarty.get.fieldid eq 'residecommunity' }}  font-weight: 900;{{/if}} "><a href="/member/stat/index/?fieldid=residecommunity">居住小区</a></li>
                                    <li style="float: left; width: 160px;{{if $smarty.get.fieldid eq 'graduateschool' }}  font-weight: 900;{{/if}}"><a href="/member/stat/index/?fieldid=graduateschool">学校</a></li>
                                    <li style="float: left; width: 160px;{{if $smarty.get.fieldid eq 'education' }}  font-weight: 900;{{/if}}"><a href="/member/stat/index/?fieldid=education">学历</a></li>

                                </ul>
                                <br style="clear: both;" /></td>
                        </tr>
                        <tr><td colspan="4">当前统计项为：<font  style="font-weight: 900;"> {{$title_stat[$smarty.get.fieldid]}}</font>; 参与统计的用户数： {{$total}}</td></tr>
                        <tr class="hover">
                            <td width="200">统计项</td>
                            <td>比例视图</td>
                            <td width="160">用户数(比率)</td>
                            <td width="160">更新时间</td>
                        </tr>
                        {{foreach $items as $item}}
                        <tr>
                            <td width="200">{{$item.fieldvalue}}</td>
                            <td><div style="background-color: yellow; width: 200px; height: 20px;"><div style="background-color: red; height: 20px; width: {{$item.width}}px;"></div></div></td>
                            <td width="160">{{$item.users}}({{$item.percent}}%)</td>
                            <td width="160">{{date("Y-m-d H:i:s",$item.updatetime)}}</td>
                        </tr>
                        {{/foreach}}
                        <tr>
                            <td colspan="15">
                                <div class="form-inline " style="text-align: left;">
                                    <div  style="float: left;">
                                        <input type="radio" class="radio" name="optype" id="optype_option" value="option" />
                                        <label for="optype_option">更新统计项</label>&nbsp;&nbsp;
                                        <input type="radio" class="radio" name="optype" id="optype_data" value="data" />
                                        <label for="optype_data">更新数据</label> &nbsp;
                                        <input type="submit" class="btn" id="submit_statsubmit" name="statsubmit" title="按 Enter 键可随时提交您的修改" value="提交" />
                                    </div>
                                </div>
                            </td>
                        </tr>
                    </table>

                    <script type="text/JavaScript">_attachEvent(document.documentElement, 'keydown', function (e) { entersubmit(e, 'statsubmit'); });</script>
                </form>

            </div>
        </div>
    </div>
</body>
</html>